package org.code.mallspringboot.service.impl;

import org.code.mallspringboot.mapper.PmsProductMapper;
import org.code.mallspringboot.pojo.PmsProduct;
import org.code.mallspringboot.service.PmsProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class PmsProductServiceImpl implements PmsProductService{

    @Autowired
    private PmsProductMapper pmsProductMapper;

    @Override
    public List<PmsProduct> list(int pageNum, int pageSize) {
        return pmsProductMapper.list((pageNum - 1) * pageSize , pageSize);
    }

    @Override
    public PmsProduct selectById(int id) {
        return pmsProductMapper.selectById(id);
    }
}




